import { connect } from 'react-redux';

import style from './body.scss';
class Body extends React.Component{
	constructor(){
		super();
	}
	render(){
		return (
			<div className={cn({
				[style["blog-container"]]:true,
				[style["sidebar-open"]]:this.props.isSidebarOpen
			})}>
				{this.props.children}
			</div>
		)
	}
}
function mapStateToProp(state){
	return {
		isSidebarOpen:state.sidebar.isOpen
	}
}
export default connect(mapStateToProp)(Body)